package test;

/**
 * @author oldliu
 * @since 1.0
 */
public class Zhishu3 {
    public static void main(String[] args) {
        int he=0;
        for(int i=1;i<=100;i++){
            for(int j=i;j<=100;j++){
                he=i*i+j*j;
                if(he>=10000)
                    break;
                //判断he是不是质数
                boolean zhi = true;//假定他是质数
                for (int k= 2; k * k <= he && zhi; k++) {
                    if (he % k == 0) {
                        zhi = false;//不是
                    }
                }
                if(zhi){
                    System.out.println("="+he+"=");
                }
            }
        }
    }
}
